<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
.error {
	color: red;
	font-weight: bold;
}
</style>

<title>Insert title here</title>

</head>
<body>
<c:if test="${not empty loggedUser}">
	<jsp:forward page="/index" />
</c:if>



	<form action="./registration " method=post>
		<table cellpadding=4 cellspacing=2 border=0>
			<th colspan=2><font size=5>REGISTRATION</font> <br> <font
				size=1><sup></sup> </font>
				<hr></th>
			<tr>
				<td valign=top><b>First Name<sup>*</sup> </b> <br> <input
					type="text" name="firstName"
					value="${firstname}" size=15
					maxlength=20></td>
				<td valign=top><b>Last Name<sup>*</sup> </b> <br> <input
					type="text" name="lastName" value="${lastName}" size=15
					maxlength=20></td>
			</tr>
			<c:if test="${empty firstName}">
				<tr>
					<td class="error">First name can't be empty.</td>
				</tr>
			</c:if>
			<c:if test="${empty lastName}">
				<tr>
					<td></td>
					<td class="error">Last name can't be empty.</td>
				</tr>
			</c:if>
			<tr>
				<td valign=top><b>Phone Number </b> <br> <input
					type="text" name="phoneNumber" value="${phoneNumber}" size=15
					maxlength=20></td>
			</tr>
			<tr>
				<td valign=top><b>E-Mail<sup>*</sup> </b> <br> <input
					type="text" name="email" value="${email}" size=25 maxlength=125><br>
				</td>
			</tr>
			<c:if test="${emailExists}">
				<tr>
					<td class="error">Email already exists.</td>
				</tr>
			</c:if>
			<tr>
				<td valign=top><b>Password<sup>*</sup> </b> <br> <input
					type="password" name="password" size=10 value="" maxlength=10>
				</td>
				<td valign=top><b>Confirm Password<sup>*</sup> </b> <br> <input
					type="password" name="confirmPassword" size=10 value=""
					maxlength=10>
				</td>
				<br>
			</tr>
			<c:if test="${passwordMismatch}">
				<tr>
					<td class="error">Passwords must be same.</td>
				</tr>
			</c:if>
			<tr>
				<td align=center colspan=2><hr> <input type="submit"
					value="Submit"></td>
			</tr>
		</table>
		</center>
	</form>
</body>
</html>
